package com.xiaoq;

import java.text.MessageFormat;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component("queueSender")
public class QueueSender {
	private static final Logger LOG = LoggerFactory.getLogger(QueueSender.class);
	
	
	@Resource(name = "templateA")
	private RabbitTemplate template;

	public void send(String queue, final Object message) {
		if (LOG.isDebugEnabled()) {
			LOG.debug(MessageFormat.format("send message ==> {0}, {1}", queue, message.toString()));
		}
		template.convertAndSend("deliver.queue.sms", "hello world");
	}
	
	
}